<?php
/**
 * Created by PhpStorm.
 * User: zl
 * Date: 2017/6/23
 * Time: 20:52
 */
    require_once('../Common.php');
    require_once('../BusinessFee/BusinessFee.php');
    require_once ('PDFCreator.php');
    $appID = $_REQUEST['approval_id'];
    $b_fee = new BusinessFee();
    $r = $b_fee->getSuspectFeeApprove($appID);



    if(!$r){
        $result_array['state'] = 0;
        $result_array['state_error'] = 'DB_ERROR';

    }
    else{
        $pdf = new PDFCreator();
        $url = $pdf->createSuspectFeePDF($r);
        $result_array['state'] = 1;
        $result_array['state_error'] = '';
        $result_array['url'] = $url;

    }

    echo json_encode($result_array);
?>